package com.xzl.time.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.xzl.time.pojo.vo.AdminVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.sql.Timestamp;
import java.time.LocalDateTime;

/**
 * <p>
 * 文章
 * </p>
 *
 * @author zhoubin
 * @since 2021-12-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_article")
@ApiModel(value="Article对象", description="文章")
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class Article implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    private String id;

    @ApiModelProperty(value = "专栏ID")
    private String columnid;

    @NotBlank(message = "不能为空！")
    @ApiModelProperty(value = "用户ID")
    private String userid;

    @ApiModelProperty(value = "标题")
    private String title;

    @NotBlank(message = "不能为空！")
    @ApiModelProperty(value = "文章正文")
    private String content;

    @ApiModelProperty(value = "文章封面")
    private String image;

    @ApiModelProperty(value = "发表日期")
    private Timestamp createtime;

    @ApiModelProperty(value = "修改日期")
    private Timestamp updatetime;

    @ApiModelProperty(value = "是否公开")
    private String ispublic;

    @ApiModelProperty(value = "是否置顶")
    private String istop;

    @ApiModelProperty(value = "浏览量")
    private Integer visits;

    @ApiModelProperty(value = "点赞数")
    private Integer thumbup;

    @ApiModelProperty(value = "评论数")
    private Integer comment;

    @ApiModelProperty(value = "审核状态")
    private String state;

    @ApiModelProperty(value = "所属频道")
    private String channelid;

    @ApiModelProperty(value = "URL")
    private String url;

    @ApiModelProperty(value = "类型")
    private String type;

    @TableField(exist = false)
    @ApiModelProperty(value = "当前用户点赞状态")
    private Boolean thumbUpSate;


    @TableField(exist = false)
    @ApiModelProperty(value = "文章作者信息")
    private AdminVo adminVo;

}
